<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of m_dmktlkl
 *
 * @author Trung Đặng
 */
class M_dmktkl extends CI_Model {

    public function __construct() {
        parent::__construct();
    }

    public function getAll($Loai) {
        if ($Loai != 100) {
            $this->db->where('Loai_dmKLKT', $Loai);
        }

        $query = $this->db->get('dm_ktkl');

        return $query->result_array();
    }

    public function getOneID($Ma_dmKLKT) {

        $this->db->where('Ma_dmKLKT', $Ma_dmKLKT);


        $query = $this->db->get('dm_ktkl');

        return $query->row_array();
    }

}
